package org.jackysoft.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import org.jackysoft.entity.Department;
import org.jackysoft.entity.OfficeDocument;
import org.jackysoft.entity.User;
import org.joda.time.DateTime;

@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
public class ArmMonthlySemiManufacturedProductReporter 
extends AbstractReporter {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8887870343566511697L;
	private ArmMonthlySemiManufacturedProductReporter last;
	private OfficeDocument research;
	public ArmMonthlySemiManufacturedProductReporter() {
		super();
	}

	public ArmMonthlySemiManufacturedProductReporter(String id, String title,
			DateTime createDate, DateTime updateDate, User maker,
			Department department) {
		super(id, title, createDate, updateDate, maker, department);
	}

	public void setLast(ArmMonthlySemiManufacturedProductReporter last) {
		this.last = last;
	}

	@ManyToOne
	public ArmMonthlySemiManufacturedProductReporter getLast() {
		return last;
	}

	
	@ManyToOne(cascade=CascadeType.ALL)
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.ALL})
	public OfficeDocument getResearch() {
		return research;
	}

	public void setResearch(OfficeDocument research) {
		this.research = research;
	}

}
